Skip to main content

Tutorials

Overview​

TaskPlot-level corn yield regression (bu/acre)
Text inputOne caption per week after planting, embedded with Qwen/Qwen3-Embedding-0.6B (1024-d)
Image inputUAS RGB plot tiles (.tif) with capture dates, embedded with facebook/dinov3-vitb16-pretrain-lvd1689m (768-d)
Season length22 weeks (150 days) after planting
CutoffsTrained and evaluated at weeks 4, 8, 12, 16, 20, 22; any week 1–22 can be estimated

Prerequisites​

  • Python 3.11 or newer
  • A GPU is recommended. On CPU, the inference scripts take several minutes because they run Qwen3 and DINOv3.

Getting Started: your first prediction​

  1. Clone the repository and install the dependencies:

    git clone https://huggingface.co/ICICLE-AI/multimodal-yield-estimation
    cd multimodal-yield-estimation
    pip install -r requirements.txt
  2. Point the example at your images. examples/sample_input.json contains real weekly captions for one plot, but the UAS .tif tiles are not included. Each image entry has a placeholder path such as /path/to/images/northwest_bftb_om_corn_rgb_101_20240530.tif; replace /path/to/images/ with the folder holding your tiles (or remove the images list to predict from text only).

  3. Run single-sample inference at week 12:

    python scripts/inference_single_hf.py \
    --hf_model_dir ICICLE-AI/multimodal-yield-estimation \
    --sample_json examples/sample_input.json \
    --week 12 \
    --output_json prediction.json
  4. Read the result, printed and saved to prediction.json:

    {
    "sample_id": "northwest_bftb_2024_plot101",
    "week": 12,
    "has_image_by_week": true,
    "image_age_weeks": 0,
    "yield_pred_bu_per_acre": 175.66
    }